from PyQt5.Qt import *
from demo_388_zss_ui import Ui_Form


class Window(QWidget, Ui_Form):
    def __init__(self):
        super().__init__()
        self.setWindowTitle('demo_388_装饰器连接信号和槽_2')
        self.resize(500, 500)
        self.setup_ui()
        self.setupUi(self)
        #QMetaObject.connectSlotsByName(self)

    def setup_ui(self):
        pass
    
    @pyqtSlot(str)
    def on_pushButton_signalWithParam(self, val):
        print('xxx', val)

    @pyqtSlot()
    def on_pushButton_clicked(self):
        print('button is clicked')


if __name__ == '__main__':
    import sys
    app = QApplication(sys.argv)

    win = Window()
    win.show()
    
    sys.exit(app.exec_())
